#ifndef SIMPLEPLUGIN_H
#define SIMPLEPLUGIN_H

#include <QObject>
#include <QString>
#include <QStringList>
#include <QFile>
#include <QPair>
#include <QList>
#include <QPushButton>

#include "dictionaryinterface.h"

class SimplePlugin : public QObject, DictionaryInterface
{
    Q_OBJECT
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
    Q_PLUGIN_METADATA(IID "Abhidhaana.Plugin.DictionaryInterface/1.0" FILE "simpleplugin.json")
#endif
    Q_INTERFACES(DictionaryInterface)

public:
    SimplePlugin();
    ~SimplePlugin();
//necessary APIs
    DictionaryDescription getDescription();
    void queryWord(QString key);
    QList<QPair<QString, QString> > getCandidateWords(QString key);
//optional APIs
    QWidget * getToolbarFilterWidget();
    QString getTooltip(QString protocol, QString key);
    QString getListFontName();
signals:
    void filterChanged();
    void readyToShow(QString);
private:
    QPushButton *filterBtn;
};

#endif // SIMPLEPLUGIN_H
